package com.etc.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.etc.entity.User;

@Repository
public interface UserMapper {
	int deleteByPrimaryKey(Integer uid);

	int deleteUserById(@Param("uid") Integer uid, @Param("ustate") Integer ustate);

	int insert(User record);

	int insertSelective(User record);

	User selectByPrimaryKey(Integer uid);

	int updateByPrimaryKeySelective(User record);

	int updateByPrimaryKey(User record);

	List<User> selectUserByPage(@Param("start") Integer start, @Param("pageSize") Integer pageSize,
			@Param("content") String content, @Param("ustate") Integer ustate);

	int selectCount(@Param("content") String content);

	// 登录
	User SelectUser(@Param("utel") String utel, @Param("upwd") String upwd);

	// 管理员、商家登录

	User userLogin(@Param("utel") String utel, @Param("upwd") String upwd, @Param("ustate") int ustate);

	List<User> getusersByustate(@Param("ustate") Integer ustate);
}